package com.itcat.controller;

import com.itcat.common.CommonPage;
import com.itcat.common.CommonResult;
import com.itcat.mysql.param.OmsOrderParam;
import com.itcat.mysql.pojo.OmsCompanyAddress;
import com.itcat.mysql.pojo.OmsOrder;
import com.itcat.service.OmsCompanyAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/companyAddress")
public class OmsCompanyAddressController {

    @Autowired
    private OmsCompanyAddressService omsCompanyAddressService;


    /**
     * 分页查询订单详情
     *
     * @return
     */
    @GetMapping("list")
    public CommonResult getAddress() {
        List<OmsCompanyAddress> omsCompanyAddress = omsCompanyAddressService.getAddress();

        return CommonResult.success(omsCompanyAddress);
    }
}
